package com.xm.service.impl;

import com.xm.dao.JobDao;
import com.xm.pojo.Bilibili;
import com.xm.service.JobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class JobServiceImpl implements JobService {

    @Autowired
    private JobDao JobDao;
    @Override
    @Transactional
    public void save(Bilibili bilibili) {

        this.JobDao.save(bilibili);
    }

    @Override
    public List<Bilibili> findBilibili(Bilibili bilibili) {

        List<Bilibili> all = this.JobDao.findAll(Example.of(bilibili));
        return all;
    }
}
